package com.Modular.pdf_Util.examplesPDF.AnQuanSheShiJianCha;

import com.jfinal.core.Controller;
import com.jfinal.kit.Kv;

/**
 * 安全生产检查
 */
public class AnQuanSheShiJianChaControlle extends Controller {

    public void buildPdf() {
        String Id = getPara("Id");//id
        try {
            String buildUrl = AnQuanSheShiJianChaService.service.buildPdf(Id);

            Kv dataMap = Kv.create().set("WenJianURL", buildUrl);

            renderJson(Kv.create().set("code", 200).set("data", dataMap).set("msg", "成功"));
        } catch (Exception e) {
            renderJson(Kv.create().set("code", 500).set("data", e).set("msg", "生成pdf出错"));
        }
    }
}
